/**
 * Dear programmer:
 * When I wrote this code, only god and I knew how it worked.
 * Now, only god knows it!
 *
 * @author: lyl  Date: 2019-03-02 Time: 17:22
 */

import {Action} from "../../../../../configuration/ActionCreator"
import {PersonnelStatus_Filters_deps} from "../../../../../request/PersonnelStatusRequest"
import {requestGetStatus} from "../../../../../request/DepartmentalRepairOrderRequest";
import {procExecRetrieveJqGrid} from "../../../../../request/CommonRequest";

//获取登录用户所在部门
export const PersonnelStatus_Filters= 'PersonnelStatus_Filters';
export const doSetPersonnelStatus_Filters = (getDeps,workStatus,departMent)=>dispatch =>{
    let action = Action(PersonnelStatus_Filters);
    if(getDeps)
        return dispatch(PersonnelStatus_Filters_deps(action));
    action.workStatus = workStatus;
    action.departMent = departMent;
    return dispatch(action);
}

//获取工单状态
export const SelectStatus= 'SelectStatus';
export const doGetOrderStatus = () => {
    let action = Action(SelectStatus);
    return dispatch => dispatch(requestGetStatus(action))
}

//获取房务信息
export const RetrieveJqGrid= 'RetrieveJqGrid';
export const retrieveJqGrid = () => {
    let action = Action(RetrieveJqGrid);
    let where = {"1":"1"};
    let fileds = ["clean","dirty","oo","os","co","v_exp_arr","ci","stay","due_out","o_exp_arr","touch_up","vacant","occupied","rm_status","last_night","sleep","skip","status","title","c_sort"];
    let table = "ho_s_def"
    return dispatch => dispatch(procExecRetrieveJqGrid(action, where,fileds,table))
}


